#!/bin/bash

set -ex
cd /usr/src

wait-for-it.sh -t 0 db:3306 -- echo "mysql is up"

python app.py migrate
python app.py loaddata collection.json

exec "$@"
